bin/server: src/server.c obj/BcmLib.o
	gcc src/server.c obj/BcmLib.o -o bin/server -l bcm2835 -Iinc

bin/spi: obj/BcmLib.o src/BcmLibTest.c
	gcc obj/BcmLib.o src/BcmLibTest.c -o bin/spi -l bcm2835 -Iinc

obj/BcmLib.o: src/BcmLib.c inc/BcmLib.h
	gcc -c src/BcmLib.c -o obj/BcmLib.o -Iinc

server: bin/server

spi: bin/spi

all: bin/server bin/spi

clean:
	rm -f bin/*
	rm -f obj/*
